package com.jdd.modules.system.entity;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jdd.dao.entity.TArea;
import com.jdd.dao.entity.TProject;
import lombok.Data;

@Data
@TableName("sys_user_depart")
public class SysUserDepart implements Serializable {
	private static final long serialVersionUID = 1L;

	/**主键id*/
    @TableId(type = IdType.UUID)
	private String id;
	/**用户id*/
	private String userId;
	/**部门id*/
	private String depId;

	private Integer type;

	@TableField(exist = false)
	private List<String> projectIds;

	@TableField(exist = false)
	private List<String> areaIds;

	public SysUserDepart(String id, String userId, TArea tArea) {
		super();
		this.id = id;
		this.userId = userId;
		this.depId = tArea.getId();
		this.type=0;
	}

	public SysUserDepart(String id, String userId, TProject tProject) {
		super();
		this.id = id;
		this.userId = userId;
		this.depId = tProject.getId();
		this.type=1;
	}

	public SysUserDepart(String id, String departId) {
		this.userId = id;
		this.depId = departId;
	}

	public SysUserDepart() {
	}
}
